package cn.iocoder.yudao.framework.business.sse.service;

import cn.iocoder.yudao.framework.business.sse.pojo.SseDataType;
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  Server-Sent Events (SSE)，参阅 <a href="https://developer.mozilla.org/zh-CN/docs/Web/API/Server-sent_events/Using_server-sent_events">Using server-sent events</a>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2025/03/15
 * @link <a href="https://mp.weixin.qq.com/s/CBTGeTeuoE06k6J8F-4hlw">SpringBoot + SSE 实时异步流式推送</a>
 */
public interface SseService {

    SseEmitter subscribe();

    void broadcast(SseDataType data);

}
